<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<div class="title">
    <?php echo __('user roles') ?>
</div>
<div class="admin">
<?php if ($sf_flash->has('notice')): ?>
    <div class="save-ok">
        <h2><?php echo __($sf_flash->get('notice')) ?></h2>
    </div>
<?php endif; ?>

<?php echo form_tag('user/role?id=' . $user->getId())?>
<?php foreach( $arRoles as $roleKey => $roleValue ): ?>
    <?php echo checkbox_tag('user[roles][]', $roleKey, !empty($userRoles[$roleKey]));?>
    <?php echo __($roleValue); ?>
    <br />
<?php endforeach; ?>

<div id="sf_admin_container">
<ul class="sf_admin_actions">          
  <li><?php echo submit_tag(__('save'), array (
  'name' => 'save',
  'class' => 'sf_admin_action_save',
)) ?></li>
  <li><?php echo button_to(__('list'), 'user/list?id='.$user->getId(), array (
  'class' => 'sf_admin_action_list',
)) ?></li>
</ul>   
</div>            
</form>
</div>